﻿using BCEntity.MakeStaticPagingComponent.TemplateTag;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.MakeStaticPagingComponent.TemplateTag
{
    /// <summary>
    /// 模板标签数据处理接口
    /// </summary>
    public interface ITemplateTagData
    {
        /// <summary>
        /// 检查模板标记是否存在
        /// </summary>
        /// <param name="tagName">标记名称</param>
        /// <returns></returns>
        bool CheckTemplateTagExists(string tagName);
        /// <summary>
        /// 检查模板标记是否存在
        /// </summary>
        /// <param name="templateTagId">模板标记Id</param>
        /// <returns></returns>
        bool CheckTemplateTagExists(long templateTagId);
        /// <summary>
        /// 获取模板标记名称
        /// </summary>
        /// <returns></returns>
        IEnumerable<string> GetTemplateTagName();
        /// <summary>
        /// 获取模板标记（已使用的）
        /// </summary>
        /// <param name="tagName">标记名称</param>
        /// <returns></returns>
        TemplateTagEntity GetTemplateTagEntity(string tagName);
        /// <summary>
        /// 获取模板标记
        /// </summary>
        /// <param name="templateTagId">模板标记Id</param>
        /// <returns></returns>
        TemplateTagEntity GetTemplateTagEntity(long templateTagId);

        /// <summary>
        /// 获取模板标记列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <returns></returns>
        IEnumerable<TemplateTagEntity> Get();
        /// <summary>
        /// 获取模板标记列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <param name="tagName">标签名称</param>
        /// <param name="tagDescription">标签描述</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortField">排序字段</param>
        /// <param name="ascending">排序</param>
        /// <param name="dataCount">数据总数</param>
        /// <param name="index">当前页码</param>
        /// <param name="size">每页数据条数</param>
        /// <returns></returns>
        IEnumerable<TemplateTagEntity> Query(string tagName, string tagDescription, DateTime? start, DateTime? end, string sortField, bool? ascending, out int dataCount, int index, int size);

        /// <summary>
        /// 添加模板标记信息
        /// </summary>
        /// <param name="templateTagEntity">模板标记信息</param>
        /// <returns></returns>
        TemplateTagEntity Add(TemplateTagEntity templateTagEntity);
        /// <summary>
        /// 更新模板标记信息
        /// </summary>
        /// <param name="templateTagEntity">模板标记信息</param>
        /// <returns></returns>
        TemplateTagEntity Update(TemplateTagEntity templateTagEntity);
        /// <summary>
        /// 删除模板标记信息
        /// </summary>
        /// <param name="templateTagId">模板标记Id</param>
        void Delete(long templateTagId);
    }
}
